Changing the kernel chosen by GRUB

31 Dec

Determine the options (both main and sub menu):

awk 'BEGIN {submenu=0;menu=0};$1 ~ /submenu/ {submenu+=1;menu=0;sub(/\$.*$/,"");print submenu" " $0};/menuentry / && /Linux/ {gsub(/menuentry/,"");gsub(/--class.*$/,"");gsub(/\047/,"");print "  "submenu">"menu " " $0;menu+=1}' /boot/grub/grub.cfg

Change the default to the desired option:

nano /etc/default/grub

Where X>X is the menu item (0 is the top)
This must be in quotes!

Save your new configuration:

update-grub

4 thoughts on “Changing the kernel chosen by GRUB

Leave a Reply

Your email address will not be published.